/*
 * Moseycode
 * Copyright (C) 2008  Tom Gibara
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package com.tomgibara.mosey.portal.render;

/**
 * An interface that exposes basic rendering operations. It is used to abstract a
 * graphics library operations so that the PortalPainter class can be reused on
 * multiple platforms. As such this interface only provides a small subset of
 * graphical operations; the methods that are necessary for portal rendering
 * 
 * Colors are specified as xxrrggbb (the top 8 bits are ignored). 
 * 
 * @author Tom Gibara
 *
 */

public interface GenericGraphics {

	void setFractionalMetrics(boolean b);
	
	void setStroke(float w);
	
	void setColor(int c);
	
	void setEllipse(float x, float y, float w, float h);

	void setRectangle(float x, float y, float w, float h);
	
	void setRoundedRect(float x, float y, float w, float h, float rx, float ry);

	void setString(String str);
	
	void setPoint(float x, float y);
	
	void fill();
	
	void stroke();

	float getLeft();
	
	float getTop();
	
	float getWidth();
	
	float getHeight();
	
	void storeTransform();
	
	void translate(float x, float y);
	
	void rotate(float radians);
	
	void rotate(float radians, float x, float y);
	
	void restoreTransform();
	
	void scaleFont(float s);
	
}
